//注册默认用户
let mongoose = require('mongoose');
let UserModel = mongoose.models['User'];


let register=async function(){
    for(let i=0;i<50;i++){
        let user=await UserModel.findOne({id:i});
        if(!user){
            await UserModel.create({
                nickname:`测试用户${i}`,
                id:i,
                sex:0,
                headimgurl:'http://p.3761.com/pic/58101403915021.jpg',
                token:i.toString(),
                openid:i.toString()
            });
        }
    }
}

register();
